package org.adorsys.aderp.cash.service;

import java.util.Date;
import java.util.List;

import org.adorsys.aderp.cash.domain.CashReceipt;


public class CashReceiptServiceImpl implements CashReceiptService {

	@Override
	public CashReceipt findByReceiptNumber(String personNumber) {
		List<CashReceipt> found = cashReceiptRepository.findByReceiptNumber(personNumber);
		if(found == null || found.size() == 0) return null;
		return found.iterator().next();
	}
	public List<CashReceipt> findByCashierAndCashDateBetween(String cashier,Date begin,Date end){
		return cashReceiptRepository.findByCashierAndCashDateBetween(cashier,begin,end);
	}
}
